import request from '../utils/request';
import qs from 'qs'
//登录
export const loginAPI = query => {
    return request({
        url: '/login',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 首页
export const IndexAPI = query => {
    return request({
        url: '/Index',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 持仓统计图
export const graphEchartAPI = query => {
    return request({
        url: '/graphEchart',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 趋势图
export const trendEchartAPI = query => {
    return request({
        url: '/trendEchart',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 消息通知
export const getMsgAPI = query => {
    return request({
        url: '/notificationmsg',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 删除
export const delMsgAPI = query => {
    return request({
        url: '/delnotificationmsg',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 交易品种
export const productListAPI = query => {
    return request({
        url: '/productList',
		method: 'post',
		data: qs.stringify(query)
    });
};
//历史数据
export const productBarListAPI = query => {
    return request({
        url: '/productBarList',
        method: 'post',
        data: qs.stringify(query)
    });
};
//模型列表
export const modelListAPI = query => {
    return request({
        url: '/modelList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 添加/修改模型
export const addModelAPI = query => {
    return request({
        url: '/AddModel',
        method: 'post',
        data: qs.stringify(query)
    });
};
export const editModelAPI = query => {
    return request({
        url: '/UpdateModel',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 删除模型
export const modelDelAPI = query => {
    return request({
        url: '/modelDel',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 模型训练列表
export const modelTrainListAPI = query => {
    return request({
        url: '/modelTrainList',
        method: 'post',
        data: qs.stringify(query)
    });
};

// 模型训练添加
export const addModelTrainAPI = query => {
    return request({
        url: '/AddModelTrain',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 模型训练删除
export const modelTrainDelAPI = query => {
    return request({
        url: '/modelTrainDel',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 模型训练测试报告
export const modelreportListAPI = query => {
    return request({
        url: '/modelreportList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 策略配置列表
export const strategyListAPI = query => {
    return request({
        url: '/strategyList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 策略配置添加
export const addStrategyAPI = query => {
    return request({
        url: '/AddStrategy',
        method: 'post',
        data: qs.stringify(query)
    });
};
export const editStrategyAPI = query => {
    return request({
        url: '/UpdateStrategy',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 策略配置删除
export const strategyDelAPI = query => {
    return request({
        url: '/strategyDel',
        method: 'post',
        data: qs.stringify(query)
    });
};

// 策略测试列表
export const strategytestListAPI = query => {
    return request({
        url: '/strategytestList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 策略测试添加
export const AddStrategyTestAPI = query => {
    return request({
        url: '/AddStrategyTest',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 策略测试删除
export const strategytestDelAPI = query => {
    return request({
        url: '/strategytestDel',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 交易管理
export const tradePositionListAPI = query => {
    return request({
        url: '/tradePositionList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 测试报告
export const reportListAPI = query => {
    return request({
        url: '/reportList',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 获取交易账户
export const accountListAPI = query => {
    return request({
        url: '/accounttotal',
        method: 'post',
        data: qs.stringify(query)
    });
};
// 获取交易品种
export const producttotalAPI = query => {
    return request({
        url: '/producttotal',
        method: 'post',
        data: qs.stringify(query)
    });
};